/*
 * io.h
 *
 *  Created on: Sep 19, 2012
 *      Author: andrey
 */

#ifndef IO_H_
#define IO_H_

#include "main.h"

//#include "stm32f4xx.h"
#include "stm32f4xx_gpio.h"
#include "stm32f4xx_rcc.h"
#include "stm32f4xx_syscfg.h"
#include "stm32f4xx_exti.h"
#include "misc.h"

void setPinValue(GPIO_TypeDef *IO, uint32_t pinNumber, int on);
void turnPinOn(GPIO_TypeDef *IO, uint32_t pin);
void turnPinOff(GPIO_TypeDef *IO, uint32_t pin);


void EXTILine_Config(uint32_t GPIO_Pin, uint8_t EXTI_PinSourcex,
		uint32_t EXTI_Line, uint8_t NVIC_IRQChannel);

bool_t myGetLine(BaseChannel *chp, char *line, unsigned size);
bool_t getConsoleLine(BaseChannel *chp, char *line, unsigned size);

void initSD();

#endif /* IO_H_ */
